#!/usr/bin/expect -f
set timeout 20
spawn docker-compose exec elasticsearch bin/elasticsearch-setup-passwords interactive -s
expect "*y/N]"  
send "y\r"  
expect "*elastic]:"  
send "elastic@123\r"  
expect "*elastic]:"  
send "elastic@123\r"  
expect "*apm_system]:"  
send "apm_system@123\r" 
expect "*apm_system]:"  
send "apm_system@123\r"   
expect "*kibana]:"  
send "kibana@123\r"  
expect "*kibana]:"  
send "kibana@123\r"  
expect "*logstash_system]:"  
send "logstash_system@123\r"  
expect "*logstash_system]:"  
send "logstash_system@123\r"  
expect "*beats_system]:"  
send "beats_system@123\r"  
expect "*beats_system]:"  
send "beats_system@123\r"  
expect "*remote_monitoring_user]:"  
send "remote_monitoring_user@123\r"  
expect "*remote_monitoring_user]:"  
send "remote_monitoring_user@123\r"  
interact
